package com.dykj.fireFighting.server.base.devHisResult.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dykj.fireFighting.api.base.analysis.dto.ComprehensiveQueryDto;
import com.dykj.fireFighting.api.base.analysis.dto.QueryAnalysisDto;
import com.dykj.fireFighting.api.base.analysis.entity.FireAlarmAnalysisResult;
import com.dykj.fireFighting.api.base.analysis.entity.WarningRecovery;
import com.dykj.fireFighting.api.base.analysis.vo.ComprehensiveResultFLVo;
import com.dykj.fireFighting.api.base.dev.entity.vo.FaultVo;
import com.dykj.fireFighting.api.base.devHisResult.entity.DevHisResult;
import com.dykj.fireFighting.api.base.devHisResult.entity.InstructionRecord;
import com.dykj.fireFighting.api.base.devHisResult.entity.TongBiBean;
import com.dykj.fireFighting.api.base.devHisResult.vo.ResultVo;
import com.dykj.fireFighting.common.core.mapper.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description 数据统计
 * @Author LIJIANJIE
 * @Date  2021-09-22 10:24:54
 */
public interface DevHisResultMapper extends SuperMapper<DevHisResult> {


    DevHisResult getUnitNum(@Param("unitId") String unitId,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    DevHisResult getCenterNum(@Param("ids") List<String> ids,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<FaultVo> getFaultList(@Param("ids") List<String> ids,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    int updateByUnitId(@Param("item") InstructionRecord instructionRecord);

    Integer getSumFireAlarmByMonth(String time,Long enterpriseId);

    Integer getSumFaultByMonth(String time,Long enterpriseId);

    Integer getSumEarlyWarningByMonth(String time,Long enterpriseId);

    Integer getSumFireAlarmByYear(String time,Long enterpriseId);

    Integer getSumFaultByYear(String time,Long enterpriseId);

    Integer getSumEarlyWarningByYear(String time,Long enterpriseId);

    List<TongBiBean> getTongBiBeanList(String newTime, String oldTime, Long enterpriseId,String socialUnitId);

    List<TongBiBean> getHuanBiBeanList(String newTime, String oldTime,Long enterpriseId,String socialUnitId);

    IPage<WarningRecovery> getList(Page page, @Param("queryAnalysis") QueryAnalysisDto queryAnalysis);

    List<WarningRecovery> getChartDate(@Param("queryAnalysis") QueryAnalysisDto queryAnalysis);

    FireAlarmAnalysisResult getFireNum(@Param("queryAnalysis") QueryAnalysisDto queryAnalysis);


    List<FireAlarmAnalysisResult> getFireChartData(@Param("queryAnalysis") QueryAnalysisDto queryAnalysis);

    List<FireAlarmAnalysisResult> getFaultChartData(@Param("queryAnalysis") QueryAnalysisDto queryAnalysis);

    List<TongBiBean> getHuanBiBeanList(String newTime, String oldTime,Long enterpriseId);

    List<ResultVo> getunitDate(@Param("centerId") String centerId,@Param("unitId") String unitId,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<ResultVo> getmonthDate(@Param("unitId") String unitId,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<ResultVo> getQuarterDate(@Param("unitId") String unitId,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<ResultVo> getYearDate(@Param("unitId") String unitId,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
    IPage<FireAlarmAnalysisResult> getFaultDangerList(Page page, @Param("queryAnalysis") QueryAnalysisDto queryAnalysis);

    List<FireAlarmAnalysisResult> getFaultRankingList(@Param("queryAnalysis") QueryAnalysisDto queryAnalysis);

    List<ComprehensiveResultFLVo> getFuHeLvQSByUnits(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvQSByArea(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvQSByIndustry(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvPHByUnits(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvPHByArea(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvPHByIndustry(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvQSByUnits(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvQSByArea(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvQSByIndustry(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvPHByUnits(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvPHByArea(@Param("queryDto") ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvPHByIndustry(@Param("queryDto") ComprehensiveQueryDto queryDto);
}
